package com.ruoyi.littleRedBook.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("chat_messages")
public class ChatMessage {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("sender_id")
    private Long senderId;

    @TableField("receiver_id")
    private Long receiverId;

    @TableField("product_id")
    private Long productId; // 关联商品ID（可为空）

    @TableField("message_type")
    private Integer messageType; // 1-文本 2-图片 3-系统消息 4-商品链接

    private String content;

    @TableField("is_read")
    private Integer isRead; // 0-未读 1-已读

    @TableField("created_at")
    private LocalDateTime createdAt;
}
